const { BrowserWindow, app } = require("electron");
function createWin() {
  // 创建浏览器窗口
  win = new BrowserWindow({
    width: 1094,
    height: 791,
    show: false,
    webPreferences: {
      nodeIntegration: true
    }
  });
  const URL = `http://localhost:8080`;

  win.loadURL(URL);
  win.webContents.once("dom-ready", () => {
    win.show();
  });

  win.on("closed", () => {
    win = null;
  });
}

app.on("ready", () => {
  createWin();
});
